<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>登录日志</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
</head>
<body>
<div class="wrap-container clearfix">
    <div class="column-content-detail padt10">
        <form class="layui-form" action="">
            <div class="search-cont clearfix" id="tool">
                <div class="operation-btn-cont">
                    <div class="operright cyt-retract-close hideMenu">收起筛选<i class="iconfont">&#xe658;</i></div>
                    <div class="operright cyt-retract-open showMenu" style="display: none;">展开筛选<i class="iconfont">&#xe936;</i></div>
                    <div class="triangle-bottom"></div>
                    <div class="triangle-top"></div>
                </div>
                <div class="search-details">
                    <div class="layui-form-item marb5">
                        <div class="layui-inline">
                            <label class="layui-form-label w75">登录地址：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="operIp" id="operIp" placeholder="请输入登录地址" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label w75">登录名称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="loginName" id="loginName" placeholder="请输入登录名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label w75">状态：</label>
                            <div class="layui-input-inline">
                                <select name="status" id="status"></select>
                            </div>
                        </div>
                        <div class="layui-inline marl8">
                            <button class="layui-btn layui-btn-normal" type="button" lay-submit="" lay-filter="seacherBtn">搜索</button>
                            <button class="layui-btn layui-btn-normal" type="reset">重置</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <div class="layui-form" id="table-list">
            <table id="entityList" lay-filter="entityList" class="cy-list-table"></table>
        </div>
    </div>
</div>
<!--操作-->
<script type="text/html" id="entityBar">
    <a class="layui-btn layui-btn-radius layui-btn-primary layui-btn-sm layui-smbtn-green" lay-event="add">详情</a>
</script>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['jquery', 'page'], function () {
        var $ = layui.jquery,
            page = layui.page;

        page.initDict("base_status", function (dictData) {
            page.showDict($("#status"), page.aceeptDictContentList(dictData, "base_status"), "请选择状态");
            var url = "/sysLogLogin/page";
            var cols = [
                {type: 'checkbox', fixed: 'left'},
                {type: 'numbers', title: '序号'},
                {field: 'loginName', title: '登录名称', align: 'center'},
                {field: 'operIp', title: '登录地址', align: 'center'},
                {field: 'operMac', title: 'MAC地址', align: 'center'},
                {
                    field: 'status', title: '登录状态', align: 'center', templet: function (d) {
                        if (d.status === "1") {
                            return '<span class="status-green">' + page.aceeptDictContentName(dictData, "base_status", d.status) + '</span>';
                        } else {
                            return '<span class="status-grey">' + page.aceeptDictContentName(dictData, "base_status", d.status) + '</span>';
                        }
                    }
                },
                {field: 'errorMsg', title: '错误消息', align: 'center'},
                {
                    field: 'createTime', title: '登录时间', align: 'center', templet: function (d) {
                        return new Date(d.createTime).Format("yyyy-MM-dd hh:mm:ss");
                    }
                },
                {
                    field: 'exitTime', title: '退出时间', align: 'center', templet: function (d) {
                        if (isBlank(d.exitTime)) {
                            return "无";
                        } else {
                            return new Date(d.exitTime).Format("yyyy-MM-dd hh:mm:ss");
                        }
                    }
                }
            ];
            page.initDate(cols, url);
        });
    });
</script>
</body>
</html>